#pragma once

#include "Scene.h"
#include "PushButton.h"
#include "CheckBox.h"
#include "GameOptions.h"

#include <boost/signals2/signal.hpp>

/*!
 * \class OptionsMenu
 * \brief 
 */
class OptionsMenu : public game_engine::Scene
{
///////////////////////////////////////////////////////////////////////////////
// Attribute definition
///////////////////////////////////////////////////////////////////////////////
private:
    game_engine::gui::PushButton *_btnEasy;
    game_engine::gui::PushButton *_btnMedium;
    game_engine::gui::PushButton *_btnHard;
    vector<game_engine::gui::Widget*> _difficultyGroup;

    game_engine::gui::PushButton *_btnLow;
    game_engine::gui::PushButton *_btnModerate;
    game_engine::gui::PushButton *_btnHigh;
    vector<game_engine::gui::Widget*> _graphDetailGroup;

    game_engine::gui::PushButton *_btnOk;
    game_engine::gui::PushButton *_btnCancel;
    game_engine::gui::CheckBox *_chkMusic;
    game_engine::gui::CheckBox *_chkFX;
    vector<game_engine::gui::Widget*> _widgets;
    vector<boost::signals2::connection> _btnConnections;

    GameOptions _options;

///////////////////////////////////////////////////////////////////////////////
// Method definition
///////////////////////////////////////////////////////////////////////////////
public:
    // Constructors and Destructors
    OptionsMenu(void);
    virtual ~OptionsMenu(void);

    // Others
    const BOOL initialize(void);
    const BOOL update(const FLOAT32 time);
    void finalize(void);

    // Slots
    void onEasy(BOOL clicked);
    void onMedium(BOOL clicked);
    void onHard(BOOL clicked);

    void onLow(BOOL clicked);
    void onModerate(BOOL clicked);
    void onHigh(BOOL clicked);

    void onToggleMusic(BOOL toggled);
    void onToggleFX(BOOL toggled);

    void onOk(BOOL clicked);
    void onCancel(BOOL clicked);

private:
    void createObjects(void) throw (...);
    void setDifficulty(game_engine::gui::Widget *widget);
    void setGraphicDetail(game_engine::gui::Widget *widget);
    void setMenuFocus(game_engine::gui::Widget *widget);

};
